package com.ruoyi.system.service.impl.user;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.user.VsUserMoneyLogMapper;
import com.ruoyi.system.domain.user.VsUserMoneyLog;
import com.ruoyi.system.service.user.IVsUserMoneyLogService;

/**
 * 会员余额变动Service业务层处理
 * 
 * @author zzx
 * @date 2024-04-30
 */
@Service
public class VsUserMoneyLogServiceImpl implements IVsUserMoneyLogService 
{
    @Autowired
    private VsUserMoneyLogMapper vsUserMoneyLogMapper;

    /**
     * 查询会员余额变动
     * 
     * @param id 会员余额变动主键
     * @return 会员余额变动
     */
    @Override
    public VsUserMoneyLog selectVsUserMoneyLogById(Long id)
    {
        return vsUserMoneyLogMapper.selectVsUserMoneyLogById(id);
    }

    /**
     * 查询会员余额变动列表
     * 
     * @param vsUserMoneyLog 会员余额变动
     * @return 会员余额变动
     */
    @Override
    public List<VsUserMoneyLog> selectVsUserMoneyLogList(VsUserMoneyLog vsUserMoneyLog)
    {
        return vsUserMoneyLogMapper.selectVsUserMoneyLogList(vsUserMoneyLog);
    }

    /**
     * 新增会员余额变动
     * 
     * @param vsUserMoneyLog 会员余额变动
     * @return 结果
     */
    @Override
    public int insertVsUserMoneyLog(VsUserMoneyLog vsUserMoneyLog)
    {
        vsUserMoneyLog.setCreatetime(System.currentTimeMillis());
        return vsUserMoneyLogMapper.insertVsUserMoneyLog(vsUserMoneyLog);
    }

    /**
     * 修改会员余额变动
     * 
     * @param vsUserMoneyLog 会员余额变动
     * @return 结果
     */
    @Override
    public int updateVsUserMoneyLog(VsUserMoneyLog vsUserMoneyLog)
    {
        return vsUserMoneyLogMapper.updateVsUserMoneyLog(vsUserMoneyLog);
    }

    /**
     * 批量删除会员余额变动
     * 
     * @param ids 需要删除的会员余额变动主键
     * @return 结果
     */
    @Override
    public int deleteVsUserMoneyLogByIds(Long[] ids)
    {
        return vsUserMoneyLogMapper.deleteVsUserMoneyLogByIds(ids);
    }

    /**
     * 删除会员余额变动信息
     * 
     * @param id 会员余额变动主键
     * @return 结果
     */
    @Override
    public int deleteVsUserMoneyLogById(Long id)
    {
        return vsUserMoneyLogMapper.deleteVsUserMoneyLogById(id);
    }
}
